package com.dep.dto.req;

import com.dep.common.PageRequest;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.Pattern;
import java.io.Serializable;

@Data
public class StaffReq extends PageRequest implements Serializable {
    /**
     * 编号
     */
    @ApiModelProperty("编号")
    @Pattern(regexp = "^[\\u4e00-\\u9fa5a-zA-Z0-9]{0,}$",message = "编号不支持特殊字符")
    @Length(max = 20,message = "编号长度过长,不能超过20个字符")
    private String staffNo;

    /**
     * 姓名
     */
    @ApiModelProperty("姓名")
    @Pattern(regexp = "^[\\u4e00-\\u9fa5a-zA-Z0-9]{0,}$",message = "姓名不支持特殊字符")
    @Length(max = 20,message = "姓名长度过长,不能超过20个字符")
    private String staffName;

    @ApiModelProperty("员工状态: -1-离职, 0-实习, 1-试用, 2-正式 ")
    @Range(min = -1,max = 2,message = "员工状态不正确")
    private Byte staffStatus;

}
